import Vue from 'vue'
import App from './App'



import '@/common/index.scss' //common

// api
import api from './API';// api
Vue.prototype.$api = api


// router
import { router, RouterMount } from './router.js'
Vue.use(router)

//store
import store from './store'
Vue.prototype.$store = store

//utils
import utils from '@/utils'
import * as tools from 'qs-tools'
var toolsRes = { ...utils, ...tools }
Vue.prototype.$tools = toolsRes
Vue.prototype.$setCache = toolsRes.setCache
Vue.prototype.$getCache = toolsRes.getCache

// uview
import uView from "uview-ui";
Vue.use(uView);

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	store,
	...App
})

// #ifdef H5
RouterMount(app, router, '#app')
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端
// #endif
